#include <stdio.h>
double getavg();
int main()
{
    double arr[3] = {1.1,2.2,3.3};
    double avg = 0.0;
    avg = getavg(arr,3);
    printf("%f\n",avg);
    return 0;
}
double getavg(double a[],int size)
{
    int i;
    double sum = 0;
    double avg = 0;
    for(i = 0;i < size;i++)
    {
        sum += a[i];
        printf("%f\t",a[i]);
        printf("%d\t%f\n",i,sum);
    }
    avg = sum / size;
    return avg;
}

